<template>
	<u-modal v-model="show" @confirm="modalConfirm" @cancel="handleClose" :show-cancel-button="true" width="500"
		confirm-text="立即注册" :show-title="false" confirm-color="#fb6316">
		<view class="modal-content u-flex-col u-row-center u-col-center">
			{{text}}
		</view>
	</u-modal>
</template>

<script>
	export default {
		props: ['registerShow'],
		data() {
			return {
				show: false,
				text: uni.getStorageSync("register_tip")
			}
		},
		watch: {
			registerShow: {
				deep: true,
				handler(val) {
					this.show = val
				}
			}
		},
		methods: {
			handleClose () {
				this.$emit("close")
			},
			modalConfirm() {
				this.$emit("close")
				uni.navigateTo({
					url: "/pages/register/register"
				})
			}
		}
	}
</script>

<style scoped>
	.modal-content {
		font-size: 30rpx;
		color: $u-content-color;
		padding: 20rpx;
	}
	
</style>